﻿namespace 
    ``Concerning the assertion syntax``

open System.Linq 

module 
    ``Lists``=
    open FSpec
    
    let ``it fail should.equal``()=
        capture(fun()->

            [1;2] |> should.equal [3;4]

        ).Description 
        |> should.equal Resources.TheValuesShouldBeEqual 

    let ``it fail should.contain``()=
        capture(fun()-> 
            
            [1;2;3;4;] |> should.contain 10

        ).Description 
        |> should.equal (format Resources.TheCollectionShouldContainTheElement_0_ [10])
    
    let ``it fail shouldNot.contain``()=
        capture(fun()-> 
            
            [1;2;3;4;] |> shouldNot.contain 1

        ).Description 
        |> should.equal (format Resources.TheCollectionShouldNotContainTheElement_0_ [1])

    let ``it fail should.beEmpty``()=
        capture(fun()-> 
            
            [1;2;3;4] |> should.beEmpty

        ).Description 
        |> should.equal Resources.TheCollectionShouldBeEmpty
    
    let ``it fail should.not.beEmpty``()=
        capture(fun()-> 
            
            [] |> shouldNot.beEmpty

        ).Description
        |> should.equal Resources.TheCollectionShouldNotBeEmpty 

    let ``it provide an intersection assertion``()=
        [0..3..21] |> should.intersect [0..4..28]

    let ``it fail an intersection assertion``()=
        capture(fun()->
            [0..10]
            |> should.intersect [11..20] 
        )
